There are many applications for a circuit that monitors power mains voltage zero-crossings, e.g., appliance control circuits. Zero-crossing detection may be used in for example, but is not limited to, timing delays for firing TRIACS, pulse skipping to reduce EMI, etc., and alternating current (AC) mains frequency is more accurate over a long period of time than a crystal controlled oscillator.
Referring to FIG. 1, depicted is an exemplary prior technology schematic diagram of a conventional digital device having inputs coupled to a power mains through external components. A conventional input/output port of a digital device 102 such as a digital I/O port of a microcontroller may be coupled to a power mains line through a high value impedance such as a 1 to 2 megohm resistor 104. Referring to FIG. 2, depicted is an exemplary prior technology schematic diagram of an input structure of the conventional digital device shown in FIG. 1. To perform zero-crossing detection an integrated Schmitt trigger may be coupled to the I/O port (node), for example, by programming a respective configuration register that allows such an internal coupling. When the mains power line voltage changes its sign the detector output must change its state. Currently this is sensed as a digital input. Some modules may be disturbed by injected current when the parasitic diodes conduct in the integrated circuit die of the digital device caused by the excess voltage at the input port from the voltage dropping resistor 104. This injected current may cause an undesirable disturbance in the device.
Referring to FIG. 3, depicted is an exemplary prior technology schematic diagram of an input protection circuit using external components for the conventional digital device shown in FIG. 1. External diodes 306 and 308 may be added as shown in FIG. 3, but they must be Schottky diodes to make sure that the input voltage does not reach a level such that undesirable diode conduction may occur in the internal (inside 102) diodes to Vdd and/or Vss. Using such external components causes an increase in printed circuit board size and complexity, and the bill of materials will be increased which is undesirable for many cost critical applications.